// px转换为rem
@function pxToRem($px, $base: 750px) {
    $min: 1 / $base * 10 * 1;
    $result: $px / $base * 10 * 1;

    @if $result < 0.027 and $result > 0 {
        @return 2px;
    }

    @else {
        @return $px / $base * 10 * 1rem;
    }
}

// 设置dpr下的字体大小
@mixin font-dpr($font-size, $line-height: $font-size) {
    font-size: $font-size / 2;

    @if $line-height != none {
        line-height: $line-height / 2;
    }

    [data-dpr="2"] & {
        font-size: $font-size;

        @if $line-height != none {
            line-height: $line-height;
        }
    }

    [data-dpr="3"] & {
        font-size: $font-size * 3 / 2;

        @if $line-height != none {
            line-height: $line-height * 3 / 2;
        }
    }
}

@font-face {
    font-family: 'PingFang Regular';
    src: url('../font/enroll/PingFang Regular.eot');
    src:
      url('../font/enroll/PingFang Regular.eot?#font-spider') format('embedded-opentype'),
      url('../font/enroll/PingFang Regular.woff') format('woff'),
      url('../font/enroll/PingFang Regular.ttf') format('truetype'),
      url('../font/enroll/PingFang Regular.svg') format('svg');
    font-weight: normal;
    font-style: normal;
  }

.cheer-container{
    width: 100%;
    background-image: url('../images/cheer/cheerBackground.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    font-family: 'PingFang Regular';
    padding-bottom: pxToRem(35px);

    .header{
        width: 100%;
        height: pxToRem(215px);
        padding-top: pxToRem(35px);
        position: relative;

        .time{
            width: 100%;
            height: pxToRem(215px);
            position: absolute;
            top: pxToRem(35px);
            left: 0px;
            
            .time-img{
                width: 100%;
                position: absolute;
                top: 0px;
                left: 0px;
                display: block;
            }

            .time-box{
                width: pxToRem(60px);
                position: absolute;
                top: pxToRem(10px);
                left: pxToRem(305px);
                text-align: center;
            }

            .time-word{
                color: #ea4684;
                font-weight: bold;
                @include font-dpr(38px);
                text-align: center;
            }
        }

        .rule{
            width: pxToRem(161px);
            position: absolute;
            top: pxToRem(35px);
            right: pxToRem(35px);

            .rule-link{
                display: block;
                width: 100%;
                height: 100%;
            }

            .rule-img{
                width: 100%;
                display: block;
            }
        }
    }

    .title{
        width: pxToRem(520px);
        height: pxToRem(160px);
        background-image: url('../images/cheer/titleRound.png');
        background-repeat: no-repeat;
        background-size: 100% 100%;
        margin: pxToRem(40px) auto pxToRem(30px);
        display: flex;
        align-items: center;
        justify-content: center;

        .title-box{
            text-align: center;
        }

        .title-word{
            color: #58595b;
            @include font-dpr(38px,58px);
            text-align: center;
            font-weight: bold;
        }

        .title-word-number{
            color: #ea4684;
            @include font-dpr(42px,58px);
            font-weight: bold;
        }

        .title-word2{
            color: #58595b;
            @include font-dpr(32px,58px);
            text-align: center;
            font-weight: bold;
        }
    }

    .content{
        width: 100%;
        height: pxToRem(750px);
        background-image: url('../images/cheer/cheerContent.png');
        background-repeat: no-repeat;
        background-size: 100% 100%;
        position: relative;
        text-align: center;

        .content-play{
            width: pxToRem(100px);
            height: pxToRem(100px);
            position: absolute;
            top: pxToRem(160px);
            left: pxToRem(320px);
            z-index: 999;
        }

        .poster-img{
            width: pxToRem(517px);
            height: pxToRem(310px);
            position: absolute;
            top: pxToRem(56px);
            left: pxToRem(115px);
            z-index: 998;
            border-radius: 8px;
        }
        .content-video{
            width: pxToRem(515px);
            height: pxToRem(300px);
            display: block;
            margin: 0 auto;
            padding: pxToRem(58px) 0 0 0;
            border-radius: pxToRem(20px);
        }
        .user-head{
            height: pxToRem(50px);
            position: absolute;
            left:pxToRem(250px);
            bottom: pxToRem(145px);
            img{
                width: pxToRem(30px);
                height: pxToRem(30px);
                float: left;
                margin: pxToRem(10px) pxToRem(20px);
            }
            p{
                @include font-dpr(24px, 50px);
                float: right;
                color: #fff;
            }
        }
        .content-box{
            width: pxToRem(135px);
            position: absolute;
            bottom: pxToRem(90px);
            left: pxToRem(320px);
            text-align: center;
        }

        .content-number{
            color: #ea4684;
            @include font-dpr(56px);
            font-weight: bold;
            text-align: center;
        }

        .content-cheer{
            color: #765c11;
            @include font-dpr(22px);
            position: absolute;
            bottom: pxToRem(35px);
            left: pxToRem(320px);
        }
    }

    .invitation{
        width: pxToRem(580px);
        height: pxToRem(110px);
        background-image: url('../images/cheer/invitation.png');
        background-repeat: no-repeat;
        background-size: 100% 100%;
        margin: pxToRem(70px) auto 0;
    }
}